<div class="top-bar">
	<a href="main.php?page=acon" class="button">ADD NEW </a>
	<h1>Contacts list</h1>
	<div class="breadcrumbs"><a href="#">Homepage</a> / <a href="#">Contacts list</a></div>
</div>
<div class="select-bar">
</div>
<div class="contentWrapper">
	<table class="dataTable" >
	<tr class="tableTitle">
		<td>Tên</td>
		<td>Yahoo</td>
		<td>Skype</td>
		<td>Số điện thoại</td>
		<td>Hiển thị</td>
		<td colspan="2">Thao tác</td> 
	</tr>
	<?php
		$sql="select * from lienhe";
		$res=mysql_query($sql);
		while($r=mysql_fetch_array($res)){
			$ID=$r['lhId'];
	?>
	<tr>
		<td><?php echo $r['lhName']; ?></td>
		<td><?php echo $r['lhYahoo']; ?></td>
		<td><?php echo $r['lhSkype']; ?></td>
		<td><?php echo $r['lhSDT']; ?></td>
		<td>
			<select name="select" onChange="location.href='include/contactProc.php?act=sta&ID=<? echo $ID; ?>&St='+this.value">
	  			<option value='1' <? if($r["lhStatus"]==1) echo "selected"; ?>>Hiển thị</option>
	  			<option value='0' <? if($r["lhStatus"]==0) echo "selected"; ?>>Ẩn</option>
	  		</select>
		</td>
		<td><a href="main.php?page=econ&ID=<?php echo $r['lhId']; ?>"><img src="img/edit-icon.gif" /></a></td> 
		<td><a href="include/contactProc.php?act=del&ID=<?php echo $ID; ?>"><img src="img/hr.gif" /></a></td>
	</tr>
	<?php 
		}
	?>
	</table>
</div>

